﻿<!doctype html>
<html>
<head>
<title>Handmemo</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" href="static/style/style.css" type="text/css" />
<script language="javascript" type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
<script language="javascript" type="text/javascript" src="static/js/handmemo.js"></script>
</head>
<body>
	<div id="wrapper">
	<div id="header">
		<div id="logo" unselectable="on" onselectstart="return false;" style="-moz-user-select:none;">Handmemo</div>
		<div id="topbar"><span id="info"></span><span id="cp">{{ user|escape }} <a href="{{ logout }}">Logout</a><span></div>
	</div>
	<div id="addmemo">
		<div class="bar"><span class="addspan">＋</span>New Handmemo...<span class="deletespan">×</span></div>
		<form action="/add" method="post" id="addform">
			<textarea class="memo" name="memo"></textarea>
			<br />
			<input class="addbutton" type="submit" value="Add">
		</form>
	</div>
		<div id="memos">
		<ul>
			{% for handmemo in handmemos %}
				<li class="handmemo">
					<div class="bar"><span class="addspan">＋</span><span class="time">{{ handmemo.time|escape }}</span><span class="deletespan">×</span></div>
					<form class="updateform" action="/update" method="post">
						<textarea class="memo" name="memo">{{ handmemo.memo|escape }}</textarea>
						<br />
						<input class="key" type="hidden" name="key" value="{{ handmemo.key|escape }}">
						<input class="updatebutton" type="submit" value="Update">
					</form>
					<form class="deleteform" action="/delete" method="post">
						<input class="key" type="hidden" name="key" value="{{ handmemo.key|escape }}">
						<input class="deletebutton" type="submit" value="Delete">
					</form>
				</li>
			{% endfor %}
		</ul>
		{% if k %}
		<div id="more"><a href="?k={{ k|escape }}">More...</a></div>
		{% endif %}
		</div>
	</div>
</body>
</html>